home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 July & August / PCWorld_2006-07-08_cd.bin / komunikace / apache / apache_2[1].2.2-win32-x86-no_ssl.msi / Data1.cab / _F99A0C05940B450ECD69CAF91BA66680 < prev    next >
Extensible Markup Language  |  2006-04-21  |  9KB  |  243 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!--
  4.  Copyright 2002-2005 The Apache Software Foundation or its licensors, as
  5.  applicable.
  6.  
  7.  Licensed under the Apache License, Version 2.0 (the "License");
  8.  you may not use this file except in compliance with the License.
  9.  You may obtain a copy of the License at
  10.  
  11.      http://www.apache.org/licenses/LICENSE-2.0
  12.  
  13.  Unless required by applicable law or agreed to in writing, software
  14.  distributed under the License is distributed on an "AS IS" BASIS,
  15.  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16.  See the License for the specific language governing permissions and
  17.  limitations under the License.
  18. -->
  19.  
  20. <!DOCTYPE xsl:stylesheet [
  21.     <!ENTITY lf SYSTEM "util/lf.xml">
  22. ]>
  23. <xsl:stylesheet version="1.0"
  24.               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  25.                   xmlns="http://www.w3.org/1999/xhtml">
  26.  
  27. <!-- ==================================================================== -->
  28. <!-- <sitemap>                                                            -->
  29. <!-- Process an entire document into an HTML page                         -->
  30. <!-- ==================================================================== -->
  31. <xsl:template match="/sitemap">
  32. <html xml:lang="{$doclang}" lang="{$doclang}">
  33.     <xsl:call-template name="head" />&lf;
  34.  
  35.     <body id="manual-page">&lf;
  36.         <xsl:call-template name="top" />&lf;
  37.  
  38.         <div id="page-content">
  39.             <div id="preamble">        
  40.                 <h1>
  41.                     <xsl:value-of select="title" />
  42.                 </h1>&lf;
  43.  
  44.                 <xsl:call-template name="langavail" />&lf;
  45.  
  46.                 <xsl:apply-templates select="summary" />
  47.             </div>&lf; <!-- /#preamble -->
  48.           
  49.             <xsl:if test="(not($is-chm) and count(category) > 1) or seealso">
  50.                 <div id="quickview">
  51.                     <xsl:if test="not($is-chm) and count(category) > 1">
  52.                         <ul id="toc">&lf;
  53.                         <xsl:for-each select="category">
  54.                             <xsl:choose>
  55.                             <xsl:when test="@id">
  56.                                 <li>
  57.                                     <img src="{$path}/images/down.gif" alt="" />
  58.                                     <xsl:text> </xsl:text>
  59.                                     <a href="#{@id}">
  60.                                         <xsl:apply-templates
  61.                                             select="title" mode="print" />
  62.                                     </a>
  63.                                 </li>&lf;
  64.                             </xsl:when>
  65.                             <xsl:otherwise>
  66.                                 <li>
  67.                                     <img src="{$path}/images/down.gif" alt="" />
  68.                                     <xsl:text> </xsl:text>
  69.                                     <xsl:apply-templates
  70.                                         select="title" mode="print" />
  71.                                 </li>&lf;
  72.                             </xsl:otherwise>
  73.                             </xsl:choose>
  74.                         </xsl:for-each>
  75.                         </ul>&lf;
  76.                     </xsl:if>
  77.  
  78.                     <xsl:if test="seealso">
  79.                         <h3>
  80.                             <xsl:value-of select="$message
  81.                                                   [@id='seealso']" />
  82.                         </h3>&lf;
  83.  
  84.                         <ul class="seealso">&lf;
  85.                         <xsl:for-each select="seealso">
  86.                             <li>
  87.                                 <xsl:apply-templates />
  88.                             </li>&lf;
  89.                         </xsl:for-each>
  90.                         </ul>&lf;
  91.                     </xsl:if>
  92.                 </div>&lf; <!-- /#quickview -->
  93.             </xsl:if> <!-- have sidebar -->
  94.  
  95.             <xsl:apply-templates select="category" />
  96.         </div>&lf; <!-- /#page-content -->
  97.  
  98.         <xsl:call-template name="bottom" />&lf;
  99.     </body>
  100. </html>
  101. </xsl:template>
  102. <!-- /sitemap -->
  103.   
  104.  
  105. <!-- ==================================================================== -->
  106. <!-- category/page                                                        -->
  107. <!-- ==================================================================== -->
  108. <xsl:template match="sitemap/category/page">
  109. <li>
  110.     <xsl:if test="@separate='yes'">
  111.         <xsl:attribute name="class">separate</xsl:attribute>
  112.     </xsl:if>
  113.  
  114.     <xsl:choose>
  115.     <xsl:when test="@href">
  116.         <a href="{@href}">
  117.             <xsl:call-template name="helper.uri.fix">
  118.                 <xsl:with-param name="uri" select="@href" />
  119.             </xsl:call-template>
  120.             <xsl:value-of select="." />
  121.         </a>
  122.     </xsl:when>
  123.     <xsl:otherwise>
  124.         <xsl:value-of select="." />
  125.     </xsl:otherwise>
  126.     </xsl:choose>
  127. </li>&lf;
  128. </xsl:template>
  129. <!-- /category/page -->
  130.  
  131.  
  132. <!-- ==================================================================== -->
  133. <!-- Process a sitemap category                                           -->
  134. <!-- ==================================================================== -->
  135. <xsl:template match="sitemap/category">
  136. <xsl:call-template name="toplink" />&lf;
  137.  
  138. <div class="section">
  139.     <!-- Category title -->
  140.     <h2>
  141.         <xsl:choose>
  142.         <xsl:when test="@id">
  143.             <a id="{@id}" name="{@id}">
  144.                 <xsl:apply-templates select="title" mode="print" />
  145.             </a>
  146.         </xsl:when>
  147.         <xsl:otherwise>
  148.             <xsl:apply-templates select="title" mode="print" />
  149.         </xsl:otherwise>
  150.         </xsl:choose>
  151.     </h2>&lf;
  152.  
  153.     <!-- category body -->
  154.     <ul>
  155.         <xsl:apply-templates select="page" />
  156.     </ul>
  157.       
  158.     <!-- optional ... -->
  159.     <xsl:if test="@id = 'modules'">
  160.         <xsl:apply-templates select="document($allmodules)/modulefilelist" />
  161.     </xsl:if>
  162.     &lf;
  163. </div> <!-- /.section -->
  164. </xsl:template>
  165. <!-- /category -->
  166.  
  167.  
  168. <!-- ==================================================================== -->
  169. <!-- category/modulefilelist                                              -->
  170. <!-- insert module list into sitemap                                      -->
  171. <!-- ==================================================================== -->
  172. <xsl:template match="modulefilelist">
  173. <xsl:variable name="translist">
  174.     <xsl:text>-</xsl:text>
  175.     <xsl:for-each select="modulefile">
  176.         <xsl:variable name="current" select="document(.)/modulesynopsis" />
  177.    
  178.         <xsl:text> </xsl:text>
  179.         <xsl:value-of select="$current/name" />
  180.         <xsl:text> </xsl:text>
  181.         <xsl:call-template name="module-translatename">
  182.             <xsl:with-param name="name" select="$current/name" />
  183.         </xsl:call-template>
  184.         <xsl:text> -</xsl:text>
  185.     </xsl:for-each>
  186. </xsl:variable>
  187.  
  188. <ul>
  189. <li>
  190.     <a href="mod/core.html">
  191.         <xsl:value-of select="$message[@id='apachecore']" />
  192.     </a>
  193. </li>&lf;
  194. <li>
  195.     <a href="mod/mpm_common.html">
  196.         <xsl:value-of select="$message[@id='apachempmcommon']" />
  197.     </a>
  198. </li>&lf;
  199.  
  200. <xsl:for-each select="modulefile">
  201. <xsl:sort select="substring-before(substring-after($translist, concat('- ',
  202.                   document(.)/modulesynopsis/name, ' ')), ' -')" />
  203.  
  204.     <xsl:variable name="current" select="document(.)/modulesynopsis" />
  205.  
  206.     <xsl:if test="$current/status='MPM' and $current/name!='mpm_common'">
  207.         <xsl:variable name="name" select="substring-before(substring-after(
  208.                         $translist, concat('- ', $current/name, ' ')), ' -')" />
  209.  
  210.         <li>
  211.             <a href="mod/{$current/name}.html">
  212.                 <xsl:value-of select="$message[@id='apachempm']" />
  213.                 <xsl:text> </xsl:text>
  214.                 <xsl:value-of select="$name" />
  215.             </a>
  216.         </li>&lf;
  217.     </xsl:if>
  218. </xsl:for-each>
  219. </ul>
  220.  
  221. <ul>
  222. <xsl:for-each select="modulefile">
  223. <xsl:sort select="substring-before(substring-after($translist, concat('- ',
  224.                   document(.)/modulesynopsis/name, ' ')), ' -')"/>
  225.  
  226.     <xsl:variable name="current" select="document(.)/modulesynopsis" />
  227.  
  228.     <xsl:if test="$current/status!='MPM' and $current/status!='Core'">
  229.         <li>
  230.             <a href="mod/{$current/name}.html">
  231.                 <xsl:value-of select="$message[@id='apachemodule']"/>
  232.                 <xsl:text> </xsl:text>
  233.                 <xsl:value-of select="$current/name"/>
  234.             </a>
  235.         </li>&lf;
  236.     </xsl:if>
  237. </xsl:for-each>
  238. </ul>
  239. </xsl:template>
  240. <!-- /category/modulefilelist -->
  241.  
  242. </xsl:stylesheet>
  243.